package com.ruan.controller;

import com.ruan.entity.ResponseResult;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:HelloController
 * @Author:阮昇
 * @Description:
 * @Datetime: 2023/7/11 12:33
 **/
@RestController
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping("/hello")
    @PreAuthorize("hasAuthority('test')")
    public ResponseResult hello(){
        return new ResponseResult(200,"hello");
    }
}
